Reduce exact pinning in the edx-platform package.json file.#37961
Merged
Reduce exact pinning in the edx-platform package.json file.#37961
Conversation
d9a0ce9 to
6b39b13
Compare
Change package.json to use caret (^) pinning for flexible version resolution. Packages >=1.0.0 pin to major version, packages <1.0.0 pin to minor version. The following packages remain exact-pinned due to compatibility issues: - redux (3.7.2) and redux-thunk (2.2.0): Newer versions of redux-thunk (2.3+) require redux@^4 as a peer dependency. Since the codebase uses redux 3.x, allowing redux-thunk to upgrade would cause peer dependency conflicts and potential runtime issues. - @edx/frontend-component-cookie-policy-banner (2.2.0): Newer versions (2.6.0+) depend on @openedx/paragon@21.x which requires PNG file loaders and uses SCSS files incompatible with the current webpack/sass-loader configuration. - bootstrap (4.0.0): Newer versions (4.6.x) use a `deprecate` mixin in their SCSS that the current sass compilation setup doesn't support. - jasmine-core@2.6.4: Newer 2.x versions (2.99+) enforce stricter afterEach placement rules that break edx-ui-toolkit's ajax-helpers.js Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The caret version pinning change updated @edx/paragon from 2.6.4 to
2.7.0, which caused Icon component IDs to change from "Icon2" to
"Icon1" in snapshot tests.
This is a cosmetic change with no functional impact. The Icon
component generates unique IDs using a module-level counter in
src/utils/newId.js:
let lastId = 0;
const newId = (prefix = 'id') => {
lastId += 1;
return `${prefix}${lastId}`;
};
The ID values depend on module import order, which changed slightly
between versions. The visual rendering and accessibility features
(screen reader text) are unaffected.
References:
- Paragon Icon component: https://github.com/edx/paragon/blob/v2.7.0/src/Icon/index.jsx
- Paragon newId utility: https://github.com/edx/paragon/blob/v2.7.0/src/utils/newId.js
- Version comparison: openedx/paragon@v2.6.4...v2.7.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6a8e325 to
ccfa8d6
Compare
bradenmacdonald
approved these changes
Jan 30, 2026
Contributor
bradenmacdonald
left a comment
There was a problem hiding this comment.
Makes sense to me. I also tried out this branch and clicked around in a few legacy pages and didn't see any obvious issues.
| "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", | ||
| "@edx/edx-bootstrap": "1.0.4", | ||
| "@edx/edx-proctoring": "^4.18.1", | ||
| "@babel/core": "^7", |
Contributor
There was a problem hiding this comment.
For versions above 1.0.0 there isn't any difference between specifying ^7 and ^7.26.0 as far as I know, but I do find the shorter major-only version much cleaner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change package.json to use caret (^) pinning for flexible version resolution.
Packages >=1.0.0 pin to major version, packages <1.0.0 pin to minor version.
The following packages remain exact-pinned due to compatibility issues:
redux (3.7.2) and redux-thunk (2.2.0): Newer versions of redux-thunk
(2.3+) require redux@^4 as a peer dependency. Since the codebase uses
redux 3.x, allowing redux-thunk to upgrade would cause peer dependency
conflicts and potential runtime issues.
@edx/frontend-component-cookie-policy-banner (2.2.0): Newer versions
(2.6.0+) depend on @openedx/paragon@21.x which requires PNG file loaders
and uses SCSS files incompatible with the current webpack/sass-loader
configuration.
bootstrap (4.0.0): Newer versions (4.6.x) use a
deprecatemixin intheir SCSS that the current sass compilation setup doesn't support.
jasmine-core (2.6.4): Newer 2.x versions (2.99+) enforce stricter
afterEachplacement rules that break edx-ui-toolkit's ajax-helpers.js,which calls
afterEach()inside helper functions rather than directlyin
describe()blocks. See: https://github.com/edx/edx-ui-toolkit/blob/master/src/js/utils/spec-helpers/ajax-helpers.js#L53